#include "misc.h"

int atoi(const char* str)
{
    int n = 0;
    while (*str >= '0' && *str <= '9')
        n = n*10+*(str++)-'0';
    return n;
}
